package com.ruoyi.web.domain;

import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 微信支付订单对象 wx_pay_order
 * 
 * @author ruoyi
 * @date 2024-12-19
 */
public class WxPayOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 商户订单号 */
    @Excel(name = "商户订单号")
    @NotBlank(message = "商户订单号不能为空")
    @Size(max = 64, message = "商户订单号不能超过64个字符")
    private String outTradeNo;

    /** 微信支付订单号 */
    @Excel(name = "微信支付订单号")
    @Size(max = 64, message = "微信支付订单号不能超过64个字符")
    private String transactionId;

    /** 用户openid */
    @Excel(name = "用户openid")
    @NotBlank(message = "用户openid不能为空")
    @Size(max = 128, message = "用户openid不能超过128个字符")
    private String openid;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 应用ID */
    @Excel(name = "应用ID")
    @NotBlank(message = "应用ID不能为空")
    @Size(max = 32, message = "应用ID不能超过32个字符")
    private String appid;

    /** 商户号 */
    @Excel(name = "商户号")
    @NotBlank(message = "商户号不能为空")
    @Size(max = 32, message = "商户号不能超过32个字符")
    private String mchId;

    /** 商品描述 */
    @Excel(name = "商品描述")
    @NotBlank(message = "商品描述不能为空")
    @Size(max = 255, message = "商品描述不能超过255个字符")
    private String description;

    /** 订单总金额（分） */
    @Excel(name = "订单总金额", suffix = "分")
    @NotNull(message = "订单总金额不能为空")
    private Integer totalAmount;

    /** 货币类型 */
    @Excel(name = "货币类型")
    private String currency;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String tradeType;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private String tradeState;

    /** 交易状态描述 */
    @Excel(name = "交易状态描述")
    private String tradeStateDesc;

    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date successTime;

    /** 订单过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单过期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "订单过期时间不能为空")
    private Date expireTime;

    /** 附加数据 */
    private String attach;

    /** 通知地址 */
    private String notifyUrl;

    /** 预支付交易会话标识 */
    private String prepayId;

    /** 二维码链接 */
    private String codeUrl;

    /** 订单状态 */
    @Excel(name = "订单状态", readConverterExp = "0=待支付,1=已支付,2=已关闭,3=已退款,4=部分退款")
    private Integer orderStatus;

    /** 已退款金额（分） */
    @Excel(name = "已退款金额", suffix = "分")
    private Integer refundAmount;

    /** 业务类型 */
    @Excel(name = "业务类型")
    private String businessType;

    /** 业务订单ID */
    @Excel(name = "业务订单ID")
    private String businessId;

    /** 删除标志 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOutTradeNo(String outTradeNo) 
    {
        this.outTradeNo = outTradeNo;
    }

    public String getOutTradeNo() 
    {
        return outTradeNo;
    }

    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }

    public void setOpenid(String openid) 
    {
        this.openid = openid;
    }

    public String getOpenid() 
    {
        return openid;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setAppid(String appid) 
    {
        this.appid = appid;
    }

    public String getAppid() 
    {
        return appid;
    }

    public void setMchId(String mchId) 
    {
        this.mchId = mchId;
    }

    public String getMchId() 
    {
        return mchId;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setTotalAmount(Integer totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public Integer getTotalAmount() 
    {
        return totalAmount;
    }

    public void setCurrency(String currency) 
    {
        this.currency = currency;
    }

    public String getCurrency() 
    {
        return currency;
    }

    public void setTradeType(String tradeType) 
    {
        this.tradeType = tradeType;
    }

    public String getTradeType() 
    {
        return tradeType;
    }

    public void setTradeState(String tradeState) 
    {
        this.tradeState = tradeState;
    }

    public String getTradeState() 
    {
        return tradeState;
    }

    public void setTradeStateDesc(String tradeStateDesc) 
    {
        this.tradeStateDesc = tradeStateDesc;
    }

    public String getTradeStateDesc() 
    {
        return tradeStateDesc;
    }

    public void setSuccessTime(Date successTime) 
    {
        this.successTime = successTime;
    }

    public Date getSuccessTime() 
    {
        return successTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public void setAttach(String attach) 
    {
        this.attach = attach;
    }

    public String getAttach() 
    {
        return attach;
    }

    public void setNotifyUrl(String notifyUrl) 
    {
        this.notifyUrl = notifyUrl;
    }

    public String getNotifyUrl() 
    {
        return notifyUrl;
    }

    public void setPrepayId(String prepayId) 
    {
        this.prepayId = prepayId;
    }

    public String getPrepayId() 
    {
        return prepayId;
    }

    public void setCodeUrl(String codeUrl) 
    {
        this.codeUrl = codeUrl;
    }

    public String getCodeUrl() 
    {
        return codeUrl;
    }

    public void setOrderStatus(Integer orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderStatus() 
    {
        return orderStatus;
    }

    public void setRefundAmount(Integer refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public Integer getRefundAmount() 
    {
        return refundAmount;
    }

    public void setBusinessType(String businessType) 
    {
        this.businessType = businessType;
    }

    public String getBusinessType() 
    {
        return businessType;
    }

    public void setBusinessId(String businessId) 
    {
        this.businessId = businessId;
    }

    public String getBusinessId() 
    {
        return businessId;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("outTradeNo", getOutTradeNo())
            .append("transactionId", getTransactionId())
            .append("openid", getOpenid())
            .append("userId", getUserId())
            .append("appid", getAppid())
            .append("mchId", getMchId())
            .append("description", getDescription())
            .append("totalAmount", getTotalAmount())
            .append("currency", getCurrency())
            .append("tradeType", getTradeType())
            .append("tradeState", getTradeState())
            .append("tradeStateDesc", getTradeStateDesc())
            .append("successTime", getSuccessTime())
            .append("expireTime", getExpireTime())
            .append("attach", getAttach())
            .append("notifyUrl", getNotifyUrl())
            .append("prepayId", getPrepayId())
            .append("codeUrl", getCodeUrl())
            .append("orderStatus", getOrderStatus())
            .append("refundAmount", getRefundAmount())
            .append("businessType", getBusinessType())
            .append("businessId", getBusinessId())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
